//
//  ImageDownloader.h
//  Radio Streaming
//
//  Created by Hai Nguyen on 6/7/11.
//  Copyright 2011 VinaSource. All rights reserved.
//

@class News;

@protocol ImageDownloaderDelegate;

@interface ImageDownloader : NSObject
{
    News *news;
    NSIndexPath *indexPathInTableView;
    id <ImageDownloaderDelegate> delegate;    
    NSMutableData *activeDownload;
    NSURLConnection *imageConnection;
}

@property (nonatomic, retain) News *news;
@property (nonatomic, retain) NSIndexPath *indexPathInTableView;
@property (nonatomic, assign) id <ImageDownloaderDelegate> delegate;
@property (nonatomic, retain) NSMutableData *activeDownload;
@property (nonatomic, retain) NSURLConnection *imageConnection;

- (void)startDownload;
- (void)cancelDownload;

@end

@protocol ImageDownloaderDelegate 

- (void)appImageDidLoad:(NSIndexPath *)indexPath;

@end
